package com.aw.qzblog.utils;

import com.aw.qzblog.entity.vo.user.UserBaseInfo;

public class CurrentUserUtil {
    private static final ThreadLocal<UserBaseInfo> currentUser = new ThreadLocal<>();


    public static void setCurrentUser(UserBaseInfo userBaseInfo) {
        currentUser.set(userBaseInfo);
    }

    public static UserBaseInfo getCurrentUser() {
        return currentUser.get();
    }

    public static void removeCurrentUser() {
        currentUser.remove();
    }
}
